package org.jeecg.modules.business.outbound.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.business.outbound.entity.WmsOutReceiptTaskPick;
import org.jeecg.modules.business.outbound.entity.vo.*;

import java.util.List;

/**
 * @Description: 出库任务-拣货
 * @Author: jeecg-boot
 * @Date:   2023-08-09
 * @Version: V1.0
 */
public interface IWmsOutReceiptTaskPickService extends IService<WmsOutReceiptTaskPick> {

    /**
     * 查询所有未拣货信息
     * @param taskId
     * @param materialName
     * @param batchCode
     * @return
     */

    IPage<OutboundTaskUnPickVO> listAllUnPick(IPage<WmsOutReceiptTaskPick> page, String taskId, String materialName, String batchCode, String deviceType);


    /**
     * 查询所有已拣货信息
     * @param taskId
     * @param materialName
     * @param batchCode
     * @return
     */
    IPage<OutboundTaskPickVO> listAllPicked(IPage<WmsOutReceiptTaskPick> page,String taskId, String materialName, String batchCode);

    /**
     * 查询所有已拣货信息(全)创建出库单用
     * @param taskId
     * @return
     */
    List<OutboundTaskFullPickVO> listAllFullPicked(String taskId,Boolean unCompleted,Boolean pdaFilterFlag);

    /**
     * 查询所有已拣货信息(全)-pda用
     * @param pdaPickReqVO
     * @return
     */
    List<OutboundTaskFullPickVO> pdaListAllFullPicked(PdaPickReqVO pdaPickReqVO);

    /**
     * 分页查询所有已拣货信息(全)
     * @param page
     * @param taskId
     * @return
     */
    IPage<OutboundTaskFullPickVO> listPageAllFullPicked(IPage<WmsOutReceiptTaskPick> page, String taskId);


    /**
     * 获取拣货编号
     * @param taskId
     * @return
     */
    String getPickCode(String taskId);


    /**
     * 增加拣货信息
     * @param addPickVO
     */
    void addPickInfo(OutboundTaskAddPickVO addPickVO);

    /**
     * 取消拣货
     * @param cancelPickVO
     */
    void cancelPick(OutboundTaskCancelPickVO cancelPickVO);

    /**
     * 根据任务物料id取消拣货
     * @param cancelPickVO
     */

    void cancelPickByTaskMaterialId(OutboundTaskCancelPickByIdVO cancelPickVO);

    /**
     * 获取出库任务的配置
     * @param taskId
     * @return
     */
    JSONObject getTaskConfig(String taskId);

    /**
     * 创建出库单时扫码查询待入库物料(已拣货)
     * @param name
     * @param outReceiptTaskId
     * @return
     */
    List<OutboundTaskFullPickVO> getMaterialByNameAndTaskId(String name, String outReceiptTaskId);


    /**
     * 创建出库单时扫码查询待入库物料(未拣货)
     * @param name
     * @param outReceiptTaskId
     * @return
     */
    List<OutboundTaskUnPickVO> getUnPickMaterialByNameAndTaskId(String name, String outReceiptTaskId);



}
